import { request } from "@/utils/request";
export const api = {
  getChangeRequests: "/project/Windchill/servlet/rest/hzero/pmgt/changerequest/getChangeRequests",
  saveChangeRequest: "/project/Windchill/servlet/rest/hzero/pmgt/changerequest/saveChangeRequest",
  getProjectTaskBook: "/project/Windchill/servlet/rest/hzero/pmgt/changerequest/getProjectTaskBook",
  deleteChangeRequest: "/project/Windchill/servlet/rest/hzero/pmgt/changerequest/deleteChangeRequests",
  getProjectFourthNodes: "/project/Windchill/servlet/rest/hzero/pmgt/changerequest/getProjectFourthNodes",
  getActionsPermission:"/project/Windchill/servlet/rest/hzero/pmgt/changerequest/getActionsPermission",
}
// 获取项目变更列表
export function getChangeRequests(parameter) {
  return request({
    url: api.getChangeRequests,
    method: 'post',
    data: parameter
  })
}
// 保存项目变更列表
export function saveChangeRequest(parameter) {
  return request({
    url: api.saveChangeRequest,
    method: 'post',
    data: parameter
  })
}
// 获取项目变更关联任务书
export function getProjectTaskBook(parameter) {
  return request({
    url: api.getProjectTaskBook,
    method: 'post',
    data: parameter
  })
}
// 删除项目变更
export function deleteChangeRequest(parameter) {
  return request({
    url: api.deleteChangeRequest,
    method: 'post',
    data: parameter
  })
}
// 获取四级汇总阶段  创建变更所属项目阶段
export function getProjectFourthNodes(parameter) {
  return request({
    url: api.getProjectFourthNodes,
    method: 'post',
    data: parameter
  })
}
//获取按钮权限
export function getActionsPermission(parameter){
  return request({
    url: api.getActionsPermission,
    method: 'post',
    data: parameter
  })
}